<div class="admin-content" id="accordion">
	<div class="am-cf am-padding">
		<div class="am-fl am-cf">
			<strong class="am-text-primary am-text-lg">提取团购券</strong> / <small>DeliveryGroupTickets</small>
		</div>
	</div>

	<hr />

	<div class="am-g" ng-model="nproduct">
		<form name="formName">
			<div class="am-u-sm-12 am-u-md-8">
				<div class="am-form am-form-horizontal">
					<div class="am-form-group">
						<label class="am-form-label am-fl am-cf">提货码：</label>
						<div class="am-u-sm-9">
							<input required data-ng-model="code" placeholder="请输入提货码" type="text">
						</div>
						<button class="am-btn am-btn-primary am-form-label" data-ng-click="check(code);">确定</button>
					</div>
				</div>
			</div>
		</form>
	</div>

	<div data-ng-show="shows">
		<div class="am-cf am-padding">
			<hr />
			<div class="am-fl am-cf">
				<strong class="am-text-primary am-text-lg">订单</strong> / <small>List</small>
			</div>
		</div>
		<form data-ng-model="order">
			<div class="am-u-sm-12 am-u-md-8">
				<div class="am-form am-form-horizontal">
					<div class="am-g am-margin-top-sm">
						<div class="am-u-sm-12 am-u-md-3 am-text-left">订单ID：</div>
						<div class="am-u-sm-12 am-u-md-4 am-u-end">
							<input disabled data-ng-model="order.uuid" type="text" class="am-input-sm">
						</div>
					</div>

					<div class="am-g am-margin-top-sm">
						<div class="am-u-sm-12 am-u-md-3 am-text-left">手机号：</div>
						<div class="am-u-sm-12 am-u-md-4 am-u-end">
							<input disabled data-ng-model="order.user.phone" type="text" class="am-input-sm">
						</div>
					</div>

					<div class="am-g am-margin-top-sm">
						<div class="am-u-sm-12 am-u-md-3 am-text-left">订单描述：</div>
						<div class="am-u-sm-12 am-u-md-6 am-u-end">
							<input disabled data-ng-model="order.description" type="text" class="am-input-sm">
						</div>
					</div>

					<div class="am-g am-margin-top-sm">
						<div class="am-u-sm-12 am-u-md-3 am-text-left">产 品：</div>
						<div class="am-u-sm-12 am-u-md-6 am-u-end">
							<button class="am-btn am-btn-xs" data-am-collapse="{target: '#product'}">
								详情 <i class="am-icon-bars"></i>
							</button>
							<div id="product" class="am-collapse am-vertical-align am-in">
								<h4 class="am-list-item-text am-text-lg am-vertical-align-middle" style="color: green;">
									&nbsp;&nbsp;&nbsp;产品： <span data-ng-bind="order.group.product.description"></span>
								</h4>
								<br class="am-sm-show-only" />
								<h4 class="am-list-item-text am-text-lg am-vertical-align-middle" style="color: green;">
									团购价：￥ <span>{{ order.money+"元" }}</span> <br class="am-sm-show-only" />
									<del>
										原价：￥<span>{{ order.group.product.price }}</span>
									</del>
								</h4>
								<br class="am-sm-show-only" />
								<h4 class="am-list-item-text am-text-lg am-vertical-align-middle" style="color: green;">
									团类型：<span>{{ order.group.personAmount+"人团" }}</span>
								</h4>
							</div>
						</div>
					</div>

					<div class="am-g am-margin-top-sm">
						<div class="am-u-sm-12 am-u-md-3 am-text-left">团成员：</div>
						<div class="am-u-sm-12 am-u-md-6 am-u-end">
							<button class="am-btn am-btn-xs" data-am-collapse="{target: '#groupOwner'}">
								详情 <i class="am-icon-bars"></i>
							</button>
							<div id="groupOwner" class="am-collapse am-vertical-align am-in">
								<h4 class="am-list-item-text am-text-lg am-vertical-align-middle" style="color: green;">
									团长： <span>{{ order.groupInstance.captain.phone }}</span> <br class="am-sm-show-only" />
								</h4>
								<div data-ng-repeat="groupOwner in groupOwners">
									<hr/>
									<h4 class="am-list-item-text am-text-lg am-vertical-align-middle" style="color: green;">
										<span>{{ groupOwner.phone }}</span>
									</h4>
									<br class="am-sm-show-only" />
									<h4 class="am-list-item-text am-text-lg am-vertical-align-middle" style="color: green;">
										下单时间： <span>{{ groupOwner.phone | date : 'yyyy-MM-dd HH:mm:ss' }}</span> <br class="am-sm-show-only" />
									</h4>
								</div>
							</div>
						</div>
					</div>

					<div class="am-g am-margin-top-sm">
						<div class="am-u-sm-12 am-u-md-3 am-text-left">支付时间：</div>
						<div class="am-u-sm-12 am-u-md-4 am-u-end">
							<input disabled value="{{ order.postTime | date : 'yyyy-MM-dd HH:mm:ss' }}" type="text" class="am-input-sm">
						</div>
					</div>

					<div class="am-g am-margin-top-sm">
						<div class="am-u-sm-12 am-u-md-3 am-text-left">历史打折：</div>
						<div class="am-u-sm-12 am-u-md-4 am-u-end">
							<input disabled value="{{ order.discount? order.discount:'无'  }}" type="text" class="am-input-sm">
						</div>
					</div>

					<div class="am-g am-margin-top-sm">
						<div class="am-u-sm-12 am-u-md-3 am-text-left">总价：</div>
						<div class="am-u-sm-12 am-u-md-4 am-u-end">
							<input disabled value="{{ order.money }} 元" type="text" class="am-input-sm">
						</div>
					</div>


					<hr />

					<div class="am-g am-margin-top-sm">
						<div class="am-u-sm-4 am-u-md-4 am-text-left">
							<button class="am-btn am-btn-primary am-form-label" ng-click="delivery(order);">提货</button>
						</div>
					</div>

				</div>
			</div>
		</form>
	</div>
</div>